package com.zlx.exchange.address.controller;


import com.zlx.exchange.address.service.AddressService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 地区表(Address)表控制层
 *
 * @author makejava
 * @since 2023-09-04 20:29:17
 */
@RestController
@RequestMapping("api/address")
public class AddressController {
    /**
     * 服务对象
     */
    @Resource
    private AddressService addressService;

    @GetMapping("findProvince")
    public ResponseEntity<?> findProvince(){
        return addressService.findProvince();
    }

    @GetMapping("findRegion")
    public ResponseEntity<?> findProvince(String regionFatherId){
        return addressService.findRegion(regionFatherId);
    }
    @GetMapping("findAddress")
    public ResponseEntity<?> findAddress(String id){
        return addressService.findReginById(id);
    }
}

